package com.bootdo.member.dao;

import com.bootdo.member.domain.ShequIntegralRecord;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 积分兑换记录
 * @author lujingqian
 * @email 2100272728@qq.com
 * @date 2019-11-08 17:24:00
 */
@Mapper
public interface ShequIntegralRecordDao {

	ShequIntegralRecord get(Long id);
	
	List<ShequIntegralRecord> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(ShequIntegralRecord shequIntegralRecord);
	
	int update(ShequIntegralRecord shequIntegralRecord);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	@Select("update me_shequ_integral_record set state=#{state} where id=#{id} and state=0")
	int updateState(@Param("state") int state, @Param("id") Long id);

	List<Map> tongJi(HashMap<String, Object> map);

}
